package org.acme.rest.client.weather;

import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.jboss.resteasy.annotations.jaxrs.QueryParam;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import java.util.concurrent.CompletionStage;

/**
 * @description: ExtensionsService
 * @author: general
 * @version: 1.0
 * @create: 2022-03-07 00:23
 **/
@RegisterRestClient(configKey="weathers-api")
public interface WeatherService {

    /**
     * 同步方式
     * @param city
     * @return
     */
    @GET
    String getByCity(@QueryParam("city") String city);

    /**
     * 异步方式
     * @param city
     * @return
     */
    @GET
    CompletionStage<String> getByCityAsync(@QueryParam("city") String city);

}
